import java.util.Random;
import java.util.Scanner;

public class suijipaiming {
    public static void main(String[] args) {
        int[] num = new int[6];
        Scanner input = new Scanner(System.in);
        for (int i = 0; i < num.length; i++) {
            num[i] = input.nextInt();
        }
        Random r = new Random();
        for (int i = 0; i < num.length; i++) {
            int n = r.nextInt(6);
            int m=0;
            m = num[i];
            num[i] = num[n];
            num[n] = m;
        }
        for (int i = 0; i < num.length; i++) {
            System.out.println(num[i]);
        }
    }
}
